﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace PLCS.EntityFrameworkCore.Migrations
{
    public partial class update_triggers_new : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<int>(
                name: "DBNumber",
                table: "T_Triggers",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "DataType",
                table: "T_Triggers",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<string>(
                name: "IpAddress",
                table: "T_Triggers",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<bool>(
                name: "IsReadFromPLC",
                table: "T_Triggers",
                type: "bit",
                nullable: false,
                defaultValue: false);

            migrationBuilder.AddColumn<int>(
                name: "Offset",
                table: "T_Triggers",
                type: "int",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<int>(
                name: "Size",
                table: "T_Triggers",
                type: "int",
                nullable: false,
                defaultValue: 0);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "DBNumber",
                table: "T_Triggers");

            migrationBuilder.DropColumn(
                name: "DataType",
                table: "T_Triggers");

            migrationBuilder.DropColumn(
                name: "IpAddress",
                table: "T_Triggers");

            migrationBuilder.DropColumn(
                name: "IsReadFromPLC",
                table: "T_Triggers");

            migrationBuilder.DropColumn(
                name: "Offset",
                table: "T_Triggers");

            migrationBuilder.DropColumn(
                name: "Size",
                table: "T_Triggers");
        }
    }
}
